<?php 

$table = 'user';
$id = $_GET['id'];

$record = $conn -> get_all_data($table,$id);

?>

<div id="alert"></div>
<form class="form-horizontal" id="profile-edit-form" method="POST" onsubmit="return dashboard.admin.profile.action.edit();">
	<input type="hidden" name="id" value="<?=$record['id'] ?>" />
	<fieldset>			
		<div class="control-group">
			<label class="control-label">First Name</label>
			<div class="controls">
				<input type="text" id="firstname" class="input-xlarge" value="<?=$record['firstname'] ?>" name="firstname" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Last Name</label>
			<div class="controls">
				<input type="text" id="lastname" class="input-xlarge" value="<?=$record['lastname'] ?>" name="lastname" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Phone</label>
			<div class="controls">
				<input type="text" id="phone" class="input-xlarge" value="<?=$record['phone'] ?>" name="phone" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Address</label>
			<div class="controls">
				<input type="text" id="address" class="input-xlarge" value="<?=$record['address'] ?>" name="address" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Email</label>
			<div class="controls">
				<input type="text" id="email" class="input-xlarge" value="<?=$record['email'] ?>" name="email" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Group</label>
			<div class="controls">
				<label class="radio inline">
					<input type="radio" <?=$record['user_type']==0?"checked='checked'":"" ?> value="0" name="group" />
					Manager
				</label>
				<label class="radio inline">
					<input type="radio" <?=$record['user_type']==1?"checked='checked'":"" ?> value="1" name="group" />
					Administrator
				</label>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Disable</label>
			<div class="controls">
				<label class="radio inline">
					<input type="checkbox" <?=$record['status']==0?"checked='checked'":"" ?> value="0" name="status" />					
				</label>				
			</div>
		</div>
		<div class="form-actions">
			<button class="btn btn-primary" type="submit">Save changes</button>
			<a href="javascript:void(0)" onclick="javascript:history.go(-1);" class="btn">Cancel</a>
		</div>
	</fieldset>
</form>